package com.thx.app.remote;




import mixedserver.protocol.RPCException;

import com.thx.app.remote.model.RPCResponse;
import com.thx.app.remote.model.User_;


public interface UserInterface {
	public final static String SK_USERID = "sk_userid";
	public final static String SK_USERNAME = "sk_username";
	public final static String SK_REALNAME = "sk_realname";
	public final static String SK_DEPID = "sk_depid";
	public final static String SK_DEPNAME = "sk_depname";
	public final static String SK_USERLOGO = "sk_userlogo";
	public final static String SK_PRIVILEGE = "sk_privilege";
	public final static String SK_MOBILE = "sk_mobile";
	/**
	 * 登录接口
	 * @param userName 用户名
	 * @param pwd 密码
	 * @param validator 验证码
	 * @return 
	 */
	public RPCResponse login(String userName,String pwd,String validator,String deviceId,String imsi) throws RPCException;


	/**
	 * 用户注册用户名查询
	 * 到服务器端判断用户名是否已经注册
	 * parameter	用户名
	 * @return
	 */
	public RPCResponse loadUserSearch(String userName) throws RPCException;
	
	/**
	 * 用户注册接口
	 * 服务器保存注册用户信息，返回注册是否成功
	 * 
	 * @return
	 */
	public boolean saveUserInfor(User_ user) throws RPCException ;
	
	/**
	 * 获取 验证码
	 * @return
	 */
	public String getCaptcha(String deviceId,String simCardId) throws RPCException;
	
	/**
	 * 发送 短信验证码
	 * @param phoneNumber
	 * @param captcha
	 * @return
	 */
	public boolean sendSmsVerifyCode(String phoneNumber,String captcha,String deviceId,String simCardId) throws RPCException;
	
	/**
	 * 验证 短信验证码
	 * @param user
	 * @param userinfor
	 * @return
	 */
	//public RpcResponse checkSmsVerifyCode(String phoneNumber,String captcha,String deviceId,String simCardId) throws RPCException;
	/**
	 * 用户修改密码
	 * @param user
	 * @param userinfor
	 * @return
	 */
	public String changePassword(String userName, String oldPwd, String newPwd) throws RPCException;

	/**
	 * 注销
	 */
	public boolean logOut() throws RPCException;
	
	/**
	 * 得到当前登录用户信息
	 */
	public RPCResponse getLoadUserInfor(String pluginCode) throws RPCException;
	
	/**
	 * 上传用户头像信息
	 */
	public String sendUserImage(byte[] picStream) throws RPCException;
	/**
	 * 修改密码
	 * @param mobile
	 * @param newPwd
	 * @return
	 * @throws RPCException
	 */
	public boolean updatePwd(String mobile ,String newPwd) throws RPCException;
	/**
	 * 
	 * @param phoneNumber手机号
	 * @param reg保留字段
	 * @return
	 * @throws RPCException
	 */
	public String sendSmsStr(String phoneNumber,String reg) throws RPCException;
}
